//
//  MainGameUI.h
//  ProjectL
//
//  Created by Nguyen Tan Loc on 9/5/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "CCLayer.h"

#define TAG_LABEL_ICON_MENU 100
@class ItemIcon;

typedef enum
{
    eMT_SHOW = 0,
    eMT_HIDE,
    eMT_TRANSITING,
} MENU_TYPE;

@interface MainGameUI : CCLayerColor
{
    float mLevelTimeShow;
    
    CCSprite *mIconTime;
    CCLabelBMFont *mLabelTime;
    
    CCSprite *mIconEnergy;
    CCLabelBMFont *mLabelEnergy;
    
    CCLabelBMFont *mLabelLevel;
    
    CCLayerColor *mLayerAlpha;
    CCMenu *mMenuIcon;
    CCMenu *mMenuItem;
    CCMenuItem *mMIPause;
    CCMenuItem *mMIResume;
    CCMenuItem *mMIReplay;
    CCMenuItem *mMICalibrate;
    CCMenuItem *mMIShop;
    CCMenuItem *mMIMainMenu;
    CCMenuItemToggle *mMISoundBG;
    CCMenuItemToggle *mMISoundFX;
    
    ItemIcon *mMIItemGlove;
    ItemIcon *mMIItemXRay;
    ItemIcon *mMIItemTimer;
    ItemIcon *mMIItemMagnet;
    
    MENU_TYPE mMenuType;
}

@property (nonatomic, assign) MENU_TYPE _menuType;
@property (nonatomic, assign) float _levelTimeShow;
@property (nonatomic, assign) ItemIcon *_miItemGlove;
@property (nonatomic, assign) ItemIcon *_miItemXray;
@property (nonatomic, assign) ItemIcon *_miItemTimer;
@property (nonatomic, assign) ItemIcon *_miItemMagnet;

-(void) updateTime;
-(void) updateTimeNextTime;
-(void) updateEnergy;
-(void) updateItemInfo;
-(void) updateLabelLevel;
-(void) checkAvailableUI;
-(void) checkAvailableItem;
-(CGPoint) getIconEnergyPosition;
-(void) showItem:(BOOL)isShow;
-(ItemIcon *) getItemIconWithType:(ITEM_TYPE)type;

@end
